package cc.rengu.redp.bizimpl.upmp.service.impl;

import cc.rengu.redp.bizimpl.upmp.dao.UpmpMarketInfoMapper;
import cc.rengu.redp.bizimpl.upmp.domain.UpmpMarketInfo;
import cc.rengu.redp.bizimpl.upmp.service.IUpmpMarketInfoService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author 刘玉亮.LL
 */
@Service
public class UpmpMarketInfoServiceImpl extends ServiceImpl<UpmpMarketInfoMapper, UpmpMarketInfo> implements IUpmpMarketInfoService {

    @Override
    public UpmpMarketInfo findOneByCode(String groupMchntNo, String status,String instId) {
        LambdaQueryWrapper<UpmpMarketInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(UpmpMarketInfo::getGroupMchntNo, groupMchntNo);
        queryWrapper.eq(UpmpMarketInfo::getGroupMchntStatus, status);
        return baseMapper.selectOne(queryWrapper);
    }
}
